console.log("detected i-cable.com video page");

function documentWait()
{
//wait until head element was found
var head = document.getElementsByTagName('head');
if(!head || head.length != 1){
	console.log("waiting head..");
	window.setTimeout(documentWait,0);return;
}

 console.log("initialization finished.");

 //append customscript
 var script = document.createElement('script');
 script.id = 'customscript';
 script.src = chrome.extension.getURL("main.js");
 head[0].appendChild(script);
}

documentWait();

